package dk.au.cs.bdsi.core.repositories;

/**
 * A Simple First-In First-Out specification
 */
public interface FIFO<T> {
	/**
	 * Queues the element t into the FIFO, i.e. puts the element t at the back
	 * of the FIFO.
	 * 
	 * @param t Element to queue into the FIFO
	 */
	public void queue(T t);
	
	/**
	 * Retrieves and removes the first element of the FIFO, i.e. the element that
	 * was added to the FIFO first of all the elements currently in the FIFO. If
	 * there is no more elements in the FIFO a null value will be returned.
	 * 
	 * @return First element of the FIFO or null if there are no more elements
	 */
	public T dequeue();
}
